package com.zeratul.common.config;

import com.zeratul.common.trace.TraceIdManager;
import com.zeratul.common.trace.impl.SimpleTraceIdManager;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;

@AutoConfiguration
public class TraceIdAutoConfiguration {

    /**
     * 追踪号生成器
     */
    @Bean
    @ConditionalOnMissingBean
    public TraceIdManager simpleTraceIdManager() {
        return new SimpleTraceIdManager();
    }
}
